<section class="content-header">
  <ol class="breadcrumb">
    <li><a ui-sref="dashboard"><i class="fa fa-dashboard"></i>我的面板</a></li>
    <li><a ui-sref="letter">寄件列表</a></li>
    <li class="active">详情</li>
  </ol>
</section>
<section class="content">
  <form class="form-horizontal view-form">
    <div class="detail-view-header-wrapper" ng-if="data.review_status != 1">
      <div class="box-footer detail-view-header" ui-scrollpoint ui-scrollpoint-enabled="true" ui-scrollpoint-class="fixed">
        <button type="button" class="btn btn-info" ui-sref="letter_edit({id: id})" ui-sref-opts="{reload:true}" ng-if="data.review_status != 1 && ownerMail ==true">修改</button>
        <button type="button" class="btn btn-success" ng-click="passAudit()" ng-if="data.review_status == 0 && showAudit==true">通过</button>
        <button type="button" class="btn btn-danger" ng-click="refuseAudit()" ng-if="data.review_status == 0 && showAudit==true">驳回</button>
      </div>
    </div>
    <div class="box box-danger">
      <div class="box-header with-border">
        <h3 class="box-title">基本信息</h3>
        <div class="box-tools">
          <div class="box-tools pull-right">
            <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
            </button>
          </div>
        </div>
      </div>
      <div class="box-body">
        <div class="form-group">
          <label class="col-sm-2 control-label">编号</label>
          <div class="col-sm-8">
            <span class="form-span" ng-bind="data.code"></span>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">类型</label>
          <div class="col-sm-8">
            <span class="form-span" ng-bind="data.type"></span>
          </div>
        </div>

        <div class="form-group">
          <label class="col-sm-2 control-label">信件内容</label>
          <div class="col-sm-8">
            <span class="form-span" ng-bind="data.letter_type"></span>
          </div>
        </div>

        <div class="form-group">
          <label class="col-sm-2 control-label">信件类别</label>
          <div class="col-sm-8">
            <span class="form-span" ng-bind="data.letter_kind"></span>
          </div>
        </div>

        <div class="form-group">
          <label class="col-sm-2 control-label">信件数量</label>
          <div class="col-sm-8">
            <span class="form-span" ng-bind="data.qty"></span>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">纳入库存数</label>
          <div class="col-sm-8">
            <span class="form-span" ng-bind="data.stockQty"></span>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">寄件日期</label>
          <div class="col-sm-8">
            <span class="form-span" ng-bind="format(data.date_at, 'YYYY-MM-DD')"></span>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">信件单号</label>
          <div class="col-sm-8">
            <span class="form-span" ng-bind="data.code"></span>
          </div>
        </div>

        <div class="form-group">
          <label class="col-sm-2 control-label">档案号</label>
          <div class="col-sm-8">
            <span class="form-span" ng-bind="data.order_code"></span>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">订单中文名</label>
          <div class="col-sm-8">
            <span class="form-span" ng-bind="data.order_name_cn"></span>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">订单英文名</label>
          <div class="col-sm-8">
            <span class="form-span" ng-bind="data.order_name_en"></span>
          </div>
        </div>


        <div class="form-group">
          <label class="col-sm-2 control-label">收件人</label>
          <div class="col-sm-8">
            <span class="form-span" ng-bind="data.receiver"></span>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">收件人电话</label>
          <div class="col-sm-8">
            <span class="form-span" ng-bind="data.tel"></span>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">收件地址</label>
          <div class="col-sm-8">
            <span class="form-span" ng-bind="data.province + data.city + data.county + data.address"></span>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">快递公司</label>
          <div class="col-sm-8">
            <span class="form-span" ng-bind="data.merchant"></span>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">付款方式</label>
          <div class="col-sm-8">
            <span class="form-span" ng-bind="data.paymode"></span>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">创建人</label>
          <div class="col-sm-8">
            <span class="form-span" ng-bind="data.creator_name"></span>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">审核人</label>
          <div class="col-sm-8">
            <span class="form-span" ng-bind="data.audit_name"></span>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">状态</label>
          <div class="col-sm-8">
            <span class="form-span" ng-bind="getStatus(data.review_status)"></span>
          </div>
        </div>
        <div class="form-group" ng-if="data.review_status == -1">
          <label class="col-sm-2 control-label">驳回理由</label>
          <div class="col-sm-8">
            <span class="form-span" ng-bind="data.review_moment"></span>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">备注:</label>
          <div class="col-sm-8">
            <span class="form-span" ng-bind="data.description"></span>
          </div>
        </div>
      </div>
      <div class="modal-footer" style="text-align: left;">
        <button type="button" class="btn btn-info" ng-click="print()">打印</button>
      </div>
    </div>

  </form>
</section>
<div ui-view="modal"></div>
